Hydrocarbons, such as oil and gas, can be retrieved from subterranean zones using a well or a wellbore drilled into the subterranean formation. In some cases, the wellbore is lined by casing, which typically is a hollow steel pipe that is perforated by each production zone to extract fluids from the subterranean formation. Fluid from each production zone entering the wellbore is drawn into the tubing and guided towards the surface. For example, the fluid moves from the reservoir to the annular space, from where it can flow to an inflow control device and finally to the base pipe. The geometry of the wellbore, such as uneven drainage, can lead to a multiphase flow, due to the invasion of a gas cone or a water cone. It is common in hydrocarbon well operations to have two or more types of fluids flowing through a downhole tubular positioned in a wellbore extending through the subterranean zone. For example, during production, the fluids in the wellbore tend to separate into zones of oil, water, gas and solid (e.g., sand) flow.